$(function () {
  let params = locationParam();

  $.ajax({
    url: "http://chst.vip:1234/api/getmoneyctrlproduct",
    data: { productid: params.productid },
    success: (res) => {
      let item = res.result[0];
      let productImgSm = /http:\/\/a.{1,}g/.exec(item.productImgSm);
      let productImgSmAlt = /alt=".{1,}\w/g.exec(item.productImgSm);
      $("header").after(`
    <section id="product">
    <ul class="info">
      <li>
        <div class="infoR">
          <div class="title">
            <h4>${item.productName}</h4>
          </div>
          <div class="other">
            <span class="mall fl">${item.productFrom} | ${item.productTime}</span>
            <i>${item.productTips}</i>
          </div>
          <div class="container">
            <p>
            <img src=${productImgSm} ${productImgSmAlt}" />
            ${item.productInfo}
            ${item.productInfo1}
            ${item.productInfo2}
            </p>
          </div>
          <div class="bigimg">
            <img src=${productImgSm} ${productImgSmAlt}" />
          </div>
          <div class="city">
          ${item.productCity}
          </div>
        </div>
      </li>
    </ul>
    </section>
      `);
      $("#comment").html(`${item.productComment}`);
    },
  });
});
